//  Copyright (c) 2008  Yoong-ki Ahn & Youngjin Kim < mexif@googlegroups.com>
//  See the enclosed file COPYING for license information (MIT Licence).
//  If you did not receive this file,
//  see http://www.opensource.org/licenses/mit-license.php.

#include "common.h"

int main( int argc, const char* argv[] )
{
    if ( argc < 2 )
    {
        puts( "makernote.exe INPUT_FILE" );
        return 1;
    }

    string_list lines = load_text( argv[1] );
    //print_text( lines );

    maker_tag_list tags = parse_maker_tag( lines );
    //print_tags( tags );

    Option opt = fill_option( argv[1], lines );

    string_list header, source;
    gen_tagid_macro( opt, tags, header );
	gen_tagid_db( opt, tags, header, source );
	//gen_tagid_meta( opt, tags, header, source );
	//gen_tagid_string( opt, tags, header, source );

    print_text( source );
	save_text( opt.source.c_str(), source );
	save_text( opt.header.c_str(), header );

    return 0;
}


